package edu.esiag.isidis.fi.lb.impl;

import edu.esiag.isidis.fi.lb.interfaces.IEntity;
import edu.esiag.isidis.fi.lb.interfaces.IMangerLB;
import edu.esiag.isidis.fi.lb.interfaces.INotifier;

public class Notifier<TypeInformation> implements INotifier<TypeInformation> {
	IMangerLB<?,TypeInformation> loadBalancer;
	public Object notifier(TypeInformation information) throws NoEntityException {
		IEntity<TypeInformation> entity= (IEntity<TypeInformation>) loadBalancer.loadBalance(information);
		return entity.getIdentifier();
	}
	public IMangerLB<?, TypeInformation> getLoadBalancer() {
		return loadBalancer;
	}
	public void setLoadBalancer(IMangerLB<?, TypeInformation> loadBalancer) {
		this.loadBalancer = loadBalancer;
	}
}
